<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<ui:composition template="../template/layout.xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	<ui:param name="pageHeaderTitle" value="Create treatment act" />
	<ui:param name="pageTitle" value="Create treatment act" />
	<ui:define name="content">
		<div id="inner_content">
			<h:form>
				<h:panelGrid columns="2"
					columnClasses="createActGridColumn1, createActGridColumn2"
					cellpadding="8" style="margin-top: 40px">
					
					<h:panelGroup>
						<p:outputLabel value="Appeal date" for="appealDate" />
						<br />
						<p:calendar value="#{createTreatmentActBean.treatmentAct.appealDate}" pattern="MM/dd/yyyy" 
							id="appealDate" showOn="button" styleClass="pCalendar"  mindate="c-7" maxdate="c" 
							converter="stringToCalendarConverterNoTime" readonly="#{facesContext.renderResponse}" />
					</h:panelGroup>
					
					<h:panelGroup>
						<br />
						<p:message for="appealDate" />
					</h:panelGroup>				

					<h:panelGroup>
						<p:outputLabel value="Symptoms" for="symptoms" />
						<br />
						<p:inputTextarea id="symptoms" rows="20" cols="50"
							autoResize="false" styleClass="info_area"
							value="#{createTreatmentActBean.treatmentAct.symptoms}" maxlength="200"/>
					</h:panelGroup>
					
					<h:panelGroup>
						<br />
						<p:message for="symptoms" />
					</h:panelGroup>

					<h:panelGroup>
						<br />
						<p:commandButton value="Submit"
							action="#{createTreatmentActBean.createTreatmentAct()}"
							styleClass="pCommandButton" ajax="false" />
					</h:panelGroup>										
					
				</h:panelGrid>
			</h:form>
		</div>
	</ui:define>
<ui:define name="footer">	
	<ui:param name="navBean" value="#{createTreatmentActBean}" />
	<ui:param name="navAction" value="goBack" />
	<ui:param name="navTitle" value="Back" />
	<ui:include src="/template/footer_bean_navigation.xhtml" />
</ui:define>
</ui:composition>
</html>